package com.gzz.orchid.common.boot.mybatis.conditices.rule;

import java.text.MessageFormat;

/**
 * @author higmd
 */
public class InRegular extends AbstractRegular {
    private final Object[] value;
    public InRegular(String fieldName, SqlSymbol previous, Object...value) {
        super(fieldName, SqlSymbol.IN, previous);
        this.value = value;
    }

    @Override
    public String resolveExpression() {
        return MessageFormat.format("{0} {1} ({2}) ", fieldName, symbol.getNotation(), formatterValue(value));
        //String.format("%s %s (%s)", fieldName, symbol.getNotation(), extractValue());
    }
}
